branch-4.0: [fix](mv) Fix sync mv could not be chosen by cbo stable because stats upload from be not in time #58720#58772
Merged
yiguolei merged 1 commit intobranch-4.0from Dec 11, 2025
Conversation
… upload from be not in time (#58720) This PR introduces two key modifications to improve the reliability of the optimizer (CBO) and the testing pipeline concerning materialized views: 1. Fixes unstable selection of synchronous materialized views in the pipeline: The root cause was that the statistical information of the base table was not reported promptly. This delay could lead the CBO to estimate selectedPartitionsRowCountas zero for the materialized view, causing it to be incorrectly bypassed during query planning. The fix involves manually injecting the statistical information for the synchronous materialized view when available, ensuring the CBO can make a stable and accurate assessment of its cost . 2. Removes the fuzzy value setting for preMaterializedViewRewriteStrategyin SessionVariable: The test cases for the TRY_IN_RBO strategy have already been extended to cover scenarios equivalent to both NOT_IN_RBO and FORCE_IN_RBO. Retaining the fuzzy option can introduce unnecessary instability into the pipeline. For instance, a PR might pass tests when the strategy is TRY_IN_RBO but fail if the pipeline randomly selects NOT_IN_RBO, leading to inconsistent results. Removing this fuzzy setting helps eliminate such non-deterministic failures and enhances pipeline stability
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
yiguolei
approved these changes
Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked from #58720